package sdk8.enumUse;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 *
 * @className: Test1
 * @author: junjie
 * @date: 2022-07-21 11:11
 */
public class Test1 {
    public static void main(String[] args) {

        List<AlarmTypeCountRes> alarmTypeCountResults = new ArrayList<>();

        for (AlarmTypeEnum u :AlarmTypeEnum.values()) {
            AlarmTypeCountRes alarmTypeItem = new AlarmTypeCountRes();
            alarmTypeCountResults.stream().map(alarmType ->
            {
                alarmType.setAlarmType(u.getCode());
                alarmType.setAlarmTypeStr(u.getDesc());
                return alarmType;
            }).collect(Collectors.toList());
        }
        System.out.println();
        //拿到所有有告警记录的人员的告警类型次数
        alarmTypeCountResults.stream().forEach(alarmTypeStr-> System.out.println(alarmTypeStr));
    }
}
